const { defineConfig } = require('@vue/cli-service')
const path = require('path')

function resolve(dir) {
  return path.join(__dirname, dir)
}

module.exports = defineConfig({
  transpileDependencies: true,

  pluginOptions: {
    'style-resources-loader': {
      preProcessor: 'scss',
      patterns: [
        // 自动化注入的文件
        resolve('./src/assets/styles/common.scss'),
        resolve('./src/assets/styles/uni-scss/index.scss'),
      ],
    },
  },

  devServer: {
    open: true,
  },
})
